package com.x.chalk.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;

 /**
 * 评论表;
 * @author : 冯文坡
 * @date : 2022-10-4
 */
@ApiModel(value = "评论表",description = "")
@Data
public class Comment implements Serializable{
    /** 评论表id */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(name = "评论表id",notes = "")
    private Long id ;
    /** 用户id */
    @ApiModelProperty(name = "用户id",notes = "")
    private Long uid ;
    /** 圈子id */
    @ApiModelProperty(name = "圈子id",notes = "")
    private Long moodId ;
    /** 评论内容 */
    @ApiModelProperty(name = "评论内容",notes = "")
    private String info ;
    /** 二级评论 */
    @ApiModelProperty(name = "二级评论",notes = "")
    private Long pid ;
    /** 创建时间 */
    @ApiModelProperty(name = "创建时间",notes = "")
    private Date createTime ;

     public Comment(Long uid, Long moodId, String info, Long pid) {
         this.uid = uid;
         this.moodId = moodId;
         this.info = info;
         this.pid = pid;
         this.createTime = new Date();
     }
 }